package com.souche.employment.service;

import com.souche.employment.cache.RedisService;
import com.souche.employment.domain.DepartmentDO;
import com.souche.employment.mapper.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * commonService created at 2017/9/7 上午11:00
 * Ray [email:rayinhangzhou@126.com]
 * Revision History
 * Date            Programmer                   Notes
 * ----------------------------------------------------------
 **/

@Service
public class CommonService {
    @Autowired
    private DepartmentMapper departmentMapper;
    @Autowired
    private RedisService redisService;



    public String getDepNameById(String id) {
        DepartmentDO dep = departmentMapper.getDep(id);
        return dep==null?"":dep.getName();
    }
}
